import pandas as pd
df = pd.read_csv('merge.csv')
df['create_time'] = pd.to_datetime(df['create_time'])
df['年份'] = df['create_time'].dt.year
df['月份'] = df['create_time'].dt.month
monthly_sales = df.groupby(['年份', '月份','hplx'])['jz'].sum()
monthly_sales.to_csv('monthly_sales.csv')
print(monthly_sales)